<?php
defined("_ALLOW") or die ("Access denied");
?>
<?php
$email = $_REQUEST['email'];
$password = $_REQUEST['password'];
global $csdl;
$strsql = "SELECT * FROM `mk_users` WHERE `email`='$email' AND `password`=md5('$password')";
$rows = $csdl->Truyvan($strsql);
if ($csdl->sodong==0)
	mosRedirect("index.php?loginfail=1");
else {
	$row = mysql_fetch_array($rows,MYSQL_ASSOC);
	if ($row['active']==0)
		echo "T&agrave;i kho&#7843;n ch&#432;a k&iacute;ch ho&#7841;t";
	else {
		$_SESSION['username'] = $email;
		echo "&#272;&#259;ng nh&#7853;p th&agrave;nh c&ocirc;ng. V&#7873; <a href='index.php'>trang ch&#7911;</a>";
		mosRedirect("index.php?loginfail=1");
	}
}
?>